package cn.edu.lcu.cs.javalearning.collection;

import java.util.TreeSet;

/**
 * @description:
 * @author: ling
 * @since: 2021-12-04 20:37
 **/
public class TreeSetDemo {
    public static void main(String[] args) {
        TreeSet<Person> people = new TreeSet<>();

        people.add(new Person("lisi", 20));
        people.add(new Person("zhang", 12));
        people.add(new Person("wang", 15));

        people.forEach(System.out::println);
    }
}
